import { omit } from 'lodash-unified'

/**
 * 获取更新的数据
 *
 * 约等于 `stripUnknown` 设为 `true`
 */
export function getColumnDataForUpdate(
  data: Record<string, any>,
  keys: string[] = []
) {
  return omit(data, [
    'createBy',
    'createTime',
    'updateBy',
    'updateTime',
    '_X_ROW_KEY',
    '_X_ROW_CHILD',
    ...keys
  ])
}
